TARGET = systemctrl
OBJS = main.o elf.o sysmodpatches.o cpu.o plugins.o iopatch.o conf.o malloc.o kubridge.o systemctrl.o string_clone.o ../rebootex/rebootex.o setlongjmp.o stubs/LoadCoreForKernel.o stubs/ModuleMgrForKernel.o stubs/SysMemForKernel.o stubs/LoadExecForKernel.o stubs/sceCtrl_driver.o exports.o

CFLAGS = -O2 -Os -G0 -Wall -fshort-wchar -fno-pic -mno-check-zero-division
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

BUILD_PRX = 1
PRX_EXPORTS = exports.exp

USE_KERNEL_LIBC = 1
USE_KERNEL_LIBS = 1

PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak